package com.gxz.redis.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.gxz.redis.service.RedPacketService;

/**
 * @author guxz4
 * @description $description
 */
@RestController
@RequestMapping(value = "/red/packet")
public class RedPacketController {

    @Autowired
    private RedPacketService redPacketService;

    /****
     * 用于抢红包
     */
    @GetMapping(value = "/grab")
    public Double grab() {
        return redPacketService.grab();
    }

}
